#include <QCoreApplication>
#include <iostream>
#include <cmath>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    double R=0;
    double D=0;
    double L=0;
    double S=0;
    int i;
    cout<<"Viberite element, 1-R, 2-D, 3-L, 4-S: ";
    cin>>i;
    cout<<"Vvedite znachenie: ";
    switch (i)
    {
    case 1: cin>>R;cout<<"R= "<<R<<" D= "<<2*R<<" L= "<<2*3.14*R<<" S="<<3.14*(R*R);break;
    case 2: cin>>D;cout<<"R= "<<D/2<<" D= "<<D<<" L= "<<2*3.14*D/2<<" S="<<3.14*((D/2)*(D/2));break;
    case 3: cin>>L;cout<<"R= "<<L/2*3.14<<" D= "<<2*L/2*3.14<<" L= "<<2*3.14*L/2*3.14<<" S="<<3.14*(L/2*3.14)*(L/2*3.14);break;
    case 4: cin>>S;cout<<"R= "<<sqrt(S/3.14)<<" D= "<<2*sqrt(S/3.14)<<" L= "<<2*3.14*sqrt(S/3.14)<<" S="<<3.14*(sqrt(S/3.14)*sqrt(S/3.14));break;
    }
    return a.exec();
}
